//
//  NSString+EncryptionAndDecrypt.m
//  图片加密解密
//
//  Created by Bindx on 14-2-13.
//  Copyright (c) 2014年 Bindx. All rights reserved.
//

#import "NSString+EncryptionAndDecrypt.h"

@implementation NSString (EncryptionAndDecrypt)

#pragma mark 拼接加密后的字符
-(NSString *)beforeCods:(NSString*)bfcode afterCode:(NSString*)aftcode
{
    NSString* string = nil;
    string = [[NSString alloc]initWithFormat:@"%@}{%@", bfcode, aftcode];
    return string;
}

#pragma mark 拆分 解密 拼接字符
-(NSString *) completes:(NSString*)completeCoded
{
    NSString * tmp1 = nil;
    NSString * tmp2 = nil;
    NSArray *array = [completeCoded componentsSeparatedByString:@"}{"];
    tmp1 = [PassWord dePassWord:[array objectAtIndex:0] dlegate:self];
    tmp2 = [[NSString alloc]initWithFormat:@"%@%@", tmp1, [array objectAtIndex:1]];
    return tmp2;
}

@end
